package com.smsc.headend.task.engine.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.smsc.headend.module.fwu.entity.FirmwareFile;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author liangli
 * @date 2020/09/27
 */
public interface FirmwareFileMapper extends BaseMapper<FirmwareFile> {

    @Select("select FW_TYPE_ID FROM DD_FIRMWARE_FILE_TYPE_MAP where FW_FILE_TYPE_ID=#{fileTypeId}")
    Long getFwTypeIdByFwFileTypeId(@Param("fileTypeId") Long fileTypeId);

    @Select("select * FROM M_FIRMWARE_FILE where FW_FILE_NAME=#{fileName}")
    List<FirmwareFile> getByFwFileName(@Param("fileName") String fileName);
}
